package com.summer.framework.base.constant;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Description:
 *
 * @auther Ice Yang
 * Date 2025/10/1 13:39
 */
public class EnumConstant {

    private static final Map<String,String> VALUE_CACHE = new ConcurrentHashMap<>();

    private static final Map<String,String> KEY_CACHE = new ConcurrentHashMap<>();

    public static void put(String type,String code,String message,String key){
        String hash = type + StringConstant.DOT + code;
        VALUE_CACHE.put(hash,message);
        KEY_CACHE.put(hash,key);
    }

    public static String getValue(String type,String code){
        return VALUE_CACHE.get(type + StringConstant.DOT + code);
    }

    public static String getKey(String type,String code){
        return KEY_CACHE.get(type + StringConstant.DOT + code);
    }
}
